package solver

/*
func (g *Grid) getOneWings(pivot *Cell, house House, wings []*Cell) []*Cell {
	return nil
}

func (g *Grid) getTwoWings(pivot *Cell, house House) [][]*Cell {
	return nil
}

func (g *Grid) threeWingsCell(pivot *Cell) (used bool) {
	if g.TwoOneWingCell(pivot, g.boxes[pivot.boxNum],
		g.rows[pivot.rowNum], g.cols[pivot.colNum]) {
		used = true
	}
	if g.TwoOneWingCell(pivot, g.rows[pivot.rowNum],
		g.boxes[pivot.boxNum], g.cols[pivot.colNum]) {
		used = true
	}
	if g.TwoOneWingCell(pivot, g.cols[pivot.colNum],
		g.boxes[pivot.boxNum], g.rows[pivot.rowNum]) {
		used = true
	}
	if g.OneOneOneWingCell(pivot, g.cols[pivot.colNum],
		g.boxes[pivot.boxNum], g.rows[pivot.rowNum]) {
		used = true
	}

	return
}

func (g *Grid) OneOneOneWingCell(pivot *Cell, house1, house2, house3 House) (used bool) {
	for _, oneWing1 := range g.getOneWings(pivot, house1, []*Cell{}) {
		if !verifyOneWing(pivot, oneWing) {
			continue
		}
		for _, oneWing2 := range g.getOneWings(pivot, house1, []*Cell{oneWing1}) {
			if !verifyTwoWings(pivot, []*Cell{oneWing1, oneWing2}) {
				continue
			}
		}
		for _, wing := range g.getOneWings(pivot, house3, twoWings) {
			if !verifyThreeWings(pivot, twoWings) {
				continue
			}
			threeWings := append(twoWings, wing)
			if clearupThreeWings(pivot, threeWings) {
				used = true
			}
		}
	}
	return
}

func (g *Grid) TwoOneWingCell(pivot *Cell, house1, house2, house3 House) (used bool) {
	for _, twoWings := range g.getTwoWings(pivot, house1) {
		if !verifyTwoWings(pivot, twoWings) {
			continue
		}
		for _, wing := range g.getOneWings(pivot, house2, twoWings) {
			if !verifyThreeWings(pivot, twoWings) {
				continue
			}
			threeWings := append(twoWings, wing)
			if clearupThreeWings(pivot, threeWings) {
				used = true
			}
		}
		for _, wing := range g.getOneWings(pivot, house3, twoWings) {
			if !verifyThreeWings(pivot, twoWings) {
				continue
			}
			threeWings := append(twoWings, wing)
			if clearupThreeWings(pivot, threeWings) {
				used = true
			}
		}
	}
}

func (g *Grid) WXYWing() (used bool) {
	for _, row := range g.rows {
		for _, cell := range row.cells {
			if cell.candidateCount != 3 {
				continue
			}
			if g.threeWingsCell(cell) {
				used = true
			}
		}
	}
	return
}

func (g *Grid) WXYZWing() (used bool) {
	for _, row := range g.rows {
		for _, cell := range row.cells {
			if cell.candidateCount != 4 {
				continue
			}
			if g.threeWingsCell(cell) {
				used = true
			}
		}
	}
	return
}
*/
